# $Id$
# Maintainer: Laurent Carlier <lordheavym@gmail.com>

pkgname=libepoxy
pkgver=1.4.3
pkgrel=1
pkgdesc="Library handling OpenGL function pointer management"
url="https://github.com/anholt/libepoxy"
arch=(i686 x86_64)
license=(MIT)
depends=(glibc)
makedepends=(python mesa-libgl git meson doxygen graphviz)
_commit=8d03a6a8278f7e12a910b5a8288484f8ae431653  # tags/1.4.3^0
source=("git+https://github.com/anholt/libepoxy#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  meson --prefix=/usr --buildtype=release ../$pkgname -Denable-docs=true
  ninja
}

check() {
  cd build
  mesontest
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install

  cd ../$pkgname
  install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

